﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoreLib.Plugins;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using CoreLib.Components;
namespace CoreLib
{
  public  class Globals
    {
      public static DrawablePlugin SelectedObject;
      public static Vector3 Project(Vector3 point, Matrix world)
      {
          Vector4 mp = Vector4.Transform(new Vector4(point, 1.0f), Matrix.Invert(world));
          Vector3 pt = Engine.Viewport.Project(new Vector3(mp.X, mp.Y, mp.Z), CCameraComponent.Projection, Engine.CurrentCamera.View, world);
          return pt;
      }  

    }
}
